The âEWAâ model is a basic version that includes asocial learning and pay-off biased social learning. It evaluates four varying effects: learning rate, social weight, conformity, and pay-off bias.
Mathematical Details
The âExperience-Weighted Attractionâ (EWA) model links individual learning rates and social frequency to behavioral choice. Throughout this section, we use a consistent three-part index: i denotes the individual, k \in \{1, \ldots, K\} denotes the technique, and t denotes the observation (time step).
1. Mixture Likelihood
At each observation, the probability of choosing a single technique from K options is expressed through a Categorical likelihood:
Y_{[i,t]} \sim \text{Categorical}(\boldsymbol{\theta}_{[i,t]})
where:
- Y_{[i,t]} is the technique chosen by individual i at time step t.
- \boldsymbol{\theta}_{[i,t]} is a probability vector of length K giving the probability of each technique for individual i at time step t.
Unlike a standard Categorical model where \boldsymbol{\theta} is fixed for a group of observations, here \boldsymbol{\theta}_{[i,t]} is a different vector at every time step for every individual, because the attraction scores and social cues update sequentially.
The probability that individual i chooses technique k at time t decomposes as:
\theta_{[i,k,t]} = (1 - \gamma_i)\, I_{[i,k,t]} + \gamma_i\, S_{[i,k,t]}
\gamma_i = \text{sigmoid}(\mu_2 + a_{id}[i,2])
Where:
- I_{[i,k,t]} is the asocial choice probability: derived from individual iâs personal experience with technique k.
- S_{[i,k,t]} is the social choice probability: derived from observing conspecifics use technique k.
- \gamma_i \in [0, 1] is individual iâs social learning weight: at 0 the individual relies entirely on personal experience; at 1 entirely on social information. It is derived from the hierarchical prior (see §2):
2. Asocial Component â I_{[i,k,t]}
The asocial probability is a softmax over accumulated attraction scores â it converts raw attraction values into a proper probability distribution over techniques:
I_{[i,k,t]} = \frac{\exp(\lambda \cdot A_{[i,k,t]})}{\sum_{k'=1}^{K} \exp(\lambda \cdot A_{[i,k',t]})}
\lambda \sim \text{Exponential}(1)
The numerator scores technique k by the individualâs scaled attraction to it. The denominator sums this over all K techniques (k' = 1,\ldots,K), ensuring the probabilities sum to 1 and that each technique is evaluated relative to all alternatives.
Where:
- A_{[i,k,t]} is the attraction score of individual i for technique k at time t. It is a running exponentially weighted average of the personal payoffs individual i has obtained from technique k across past bouts. Larger values indicate a stronger learned payoff expectation.
- A_{[i,k',t]} in the denominator ranges over the attraction scores for all K techniques, making choice proportional to each optionâs scaled attraction relative to the full set.
- \lambda > 0 is the multinomial sensitivity (inverse temperature): higher values make choice more deterministic toward the highest-attraction option; \lambda \to 0 yields random choice. The Exponential(1) prior keeps \lambda positive and places most mass near zero, expressing a prior expectation that choice is moderately stochastic. Larger values are possible but require evidence from the data.
Attraction scores update between foraging bouts via the EWA rule:
A_{[i,k,t+1]} = (1 - \phi_i)\, A_{[i,k,t]} + \phi_i\, p_{[i,k,t]}
\phi_i = \text{sigmoid}(\mu_1 + a_{id}[i,1])
\boldsymbol{\mu} \sim \mathcal{N}(\mathbf{0}_4,\, 1)
\boldsymbol{\sigma} \sim \text{Exponential}(3)
\mathbf{L}_\rho \sim \text{LKJCholesky}(4,\, \eta = 3)
\mathbf{Z} \sim \mathcal{N}(\mathbf{0}_{4 \times J},\, 1)
\mathbf{a}_{id} = \bigl(\mathbf{L}_\rho \cdot \operatorname{diag}(\boldsymbol{\sigma}) \cdot \mathbf{Z}\bigr)^\top
Where:
- A_{[i,k,t]} is the attraction score of individual i for technique k at time t.
- p_{[i,k,t]} is the personal yield (payoff) individual i obtained from technique k at time t â concretely, a measure of food-extraction efficiency (e.g. rate of fruit opening).
- \phi_i \in [0, 1] is individual iâs attraction updating weight. Near 1: attractions closely track the most recent payoff. Near 0: strong memory of cumulative past experience. It is constructed from a multivariate hierarchical prior shared by all four individual-level learning parameters (\phi_i, \gamma_i, f_i, \beta_{i})
- \boldsymbol{\mu} \in \mathbb{R}^4 are population-level means
- a_{id}[i, \cdot] are individual-level correlated deviations reconstructed via non-centered parameterization
- \boldsymbol{\sigma} \in \mathbb{R}^4_+ are the per-parameter standard deviations (shrinkage parameters)
- \mathbf{L}_\rho is the Cholesky factor of the 4\times4 correlation matrix: the LKJ prior (\eta=3) moderately shrinks correlations toward zero.
- \mathbf{Z} \in \mathbb{R}^{J \times 4} is a matrix of standard normal deviates (one row per individual).
3. Social Component â S_{[i,k,t]}
The social probability combines payoff bias with frequency-dependent conformity:
S_{[i,k,t]} = \frac{N_{[i,k,t]}^{f_i}\, \exp(\beta_{i}\, \pi_{[i,k,t]})}{\sum_{k'=1}^{K} N_{[i,k',t]}^{f_i}\, \exp(\beta_{i}\, \pi_{[i,k',t]})}
f_i = \exp(\mu_3 + a_{id}[i,3])
\beta_{i} = \mu_4 + a_{id}[i,4]
Where:
- N_{[i,k,t]} is the frequency-bias cue: the number of times individual i observed conspecifics performing technique k at time t.
- f_i > 0 is individual iâs conformity exponent. f_i > 1: positive frequency-dependent bias (disproportionate copying of the most common technique); f_i = 1: purely linear frequency weighting; f_i < 1: tendency to avoid the majority. The exponential link ensures f_i > 0; the prior \mu_3 \sim \mathcal{N}(0,1) corresponds to f \approx 1 a priori.
- N_{[i,k',t]}^{f_i} in the denominator ranges over all K techniques with the same conformity exponent f_i, normalising the social probabilities.
- \pi_{[i,k,t]} is the payoff observed from social demonstrators using technique k at time t.
- \beta_{i} is individual iâs payoff-bias coefficient: positive values mean the individual preferentially copies techniques demonstrated with higher payoff. It is on the unconstrained real scale; the prior \mu_4 \sim \mathcal{N}(0,1) expresses prior uncertainty about the direction of payoff bias.
The numerator scores technique k by two multiplicative components: how often it was observed being used by conspecifics (N_{[i,k,t]}^{f_i}, frequency bias) and how profitable it appeared in their hands (\exp(\beta_{i}\, \pi_{[i,k,t]}), payoff bias). The denominator (k' = 1, \ldots, K) sums these scores over all techniques to normalise to a probability. Together they implement the idea that individuals copy techniques that are simultaneously common and profitable.
1. Social Learning (EWA)
The âEWAâ model is a basic version that includes asocial learning and pay-off biased social learning. It evaluates four varying effects: learning rate, social weight, conformity, and pay-off bias.
Example
id). Barrett, McElreath, and Perry (2017) use a Cholesky-factored multivariate normal prior to account for correlations between these effects.float64to match JAXâs 64-bit backend requirements for numerical stability.Mathematical Details
The âExperience-Weighted Attractionâ (EWA) model links individual learning rates and social frequency to behavioral choice. Throughout this section, we use a consistent three-part index: i denotes the individual, k \in \{1, \ldots, K\} denotes the technique, and t denotes the observation (time step).
1. Mixture Likelihood
At each observation, the probability of choosing a single technique from K options is expressed through a Categorical likelihood: Y_{[i,t]} \sim \text{Categorical}(\boldsymbol{\theta}_{[i,t]}) where:
Unlike a standard Categorical model where \boldsymbol{\theta} is fixed for a group of observations, here \boldsymbol{\theta}_{[i,t]} is a different vector at every time step for every individual, because the attraction scores and social cues update sequentially.
The probability that individual i chooses technique k at time t decomposes as: \theta_{[i,k,t]} = (1 - \gamma_i)\, I_{[i,k,t]} + \gamma_i\, S_{[i,k,t]} \gamma_i = \text{sigmoid}(\mu_2 + a_{id}[i,2])
Where:
2. Asocial Component â I_{[i,k,t]}
The asocial probability is a softmax over accumulated attraction scores â it converts raw attraction values into a proper probability distribution over techniques: I_{[i,k,t]} = \frac{\exp(\lambda \cdot A_{[i,k,t]})}{\sum_{k'=1}^{K} \exp(\lambda \cdot A_{[i,k',t]})} \lambda \sim \text{Exponential}(1)
The numerator scores technique k by the individualâs scaled attraction to it. The denominator sums this over all K techniques (k' = 1,\ldots,K), ensuring the probabilities sum to 1 and that each technique is evaluated relative to all alternatives.
Where:
Attraction scores update between foraging bouts via the EWA rule: A_{[i,k,t+1]} = (1 - \phi_i)\, A_{[i,k,t]} + \phi_i\, p_{[i,k,t]}
\phi_i = \text{sigmoid}(\mu_1 + a_{id}[i,1])
\boldsymbol{\mu} \sim \mathcal{N}(\mathbf{0}_4,\, 1) \boldsymbol{\sigma} \sim \text{Exponential}(3) \mathbf{L}_\rho \sim \text{LKJCholesky}(4,\, \eta = 3)
\mathbf{Z} \sim \mathcal{N}(\mathbf{0}_{4 \times J},\, 1) \mathbf{a}_{id} = \bigl(\mathbf{L}_\rho \cdot \operatorname{diag}(\boldsymbol{\sigma}) \cdot \mathbf{Z}\bigr)^\top
Where:
3. Social Component â S_{[i,k,t]}
The social probability combines payoff bias with frequency-dependent conformity: S_{[i,k,t]} = \frac{N_{[i,k,t]}^{f_i}\, \exp(\beta_{i}\, \pi_{[i,k,t]})}{\sum_{k'=1}^{K} N_{[i,k',t]}^{f_i}\, \exp(\beta_{i}\, \pi_{[i,k',t]})} f_i = \exp(\mu_3 + a_{id}[i,3]) \beta_{i} = \mu_4 + a_{id}[i,4]
Where:
The numerator scores technique k by two multiplicative components: how often it was observed being used by conspecifics (N_{[i,k,t]}^{f_i}, frequency bias) and how profitable it appeared in their hands (\exp(\beta_{i}\, \pi_{[i,k,t]}), payoff bias). The denominator (k' = 1, \ldots, K) sums these scores over all techniques to normalise to a probability. Together they implement the idea that individuals copy techniques that are simultaneously common and profitable.